#ifndef FORMNEWCARD_H
#define FORMNEWCARD_H

#include <QWidget>
#include <QListWidget>
#include <QPushButton>

#include "editadditionalabilitiesform.h"
#include "abstractcard.h"
#include "cardpool.h"

namespace Ui {
    class FormNewCard;
}

class FormNewCard : public QWidget {
    Q_OBJECT
public:
    explicit FormNewCard(QWidget *parent = 0);
    ~FormNewCard();
    AbstractCard * card;

protected:
    void changeEvent(QEvent *e);

private:
    Ui::FormNewCard *ui;

    void setCardRootProperty(QString, QString, QString propName = "Value");
    void removeCardRootProperty(QString);
    void addProtection(QString, bool);

    void ShowCreatureProperties(bool visible);
    void connectAll2All();

    EditAdditionalAbilitiesForm * form;

public slots:
    void SlotAddNewAdditionalAbility();
    void SlotEditAdditionalAbility(QModelIndex);

    void textCardNameChanged(QString);
    void textCardDescriptionChanged(QString);

    void cmbCardSubTypeChanged(QString);
    void cmbCardTypeChanged(QString);

    void spnDamageChanged(QString);
    void spnLifeChanged(QString);

    void chkDamageXChanged(bool);
    void chkLifeXChanged(bool);

    void chkPropertyChanged(bool);
    void chkResistantChanged(bool);

    void txtPriceChanged(QString);

    void ExpandCustomText();

    void SaveNewCard();
};

#endif // FORMNEWCARD_H
